<template>
    <el-card shadow="never">
        <Header></Header>
        <div class="playBox">
            <div class="appList" v-for="(item, index) in appList" :key="index" @click="toPath(item.path)">
                <img :src="item.img" alt="">
                <span>{{ item.title }}</span>
            </div>
        </div>
        <!-- <div class="box">
            <div data-v-4db995e4="" class="title app-main-height">
                <div class="row-bg el-row is-justify-center el-row--flex">
                    <div class="el-col el-col-24 el-col-xs-16 el-col-sm-16 el-col-md-16 el-col-lg-11 el-col-xl-11">
                        <div class="grid-content content">不要着急~ <br><br> 未来我们会上线AI写作、AI编程、AI绘图等很多很多好玩有趣的功能~ <br><br>
                            敬请期待哦～ </div>
                    </div>
                </div>
            </div>
        </div> -->
    </el-card>
</template>
<script setup lang='ts'>
const Router = useRouter()
const appList = ref([])
const getImg = (name)=>{
  return `/${name}`
}

onMounted(()=>{ 
    appList.value = [
        { title: 'AI语音' , img: getImg('ai_voice.png'), path: 'aiVoice'},
        { title: '文字识别' , img: getImg('textRecognition.png'), path: 'textRecognition'},
        { title: '图像识别' , img: getImg('imgRecognition.png'), path: 'imgRecognition' },
        { title: '图像增强与特效' , img: getImg('imgEffects.png'), path: 'imgEffects' },
        { title: 'AI绘画' , img: getImg('ai_draw.png'), path: 'aiDraw' },
    ]
})
function toPath(path) {
    Router.push({
        name: path,
    })
}
</script>
<style lang='scss' scoped>
.playBox {
    display: flex;
    // justify-content: space-evenly;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.appList {
    width: 30%;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0px 20px 0px;
    img {
        width: 40px;
        height: 40px;
        margin-bottom: 5px;
    }
}
.box {
    padding: 40px 0 60px;
    margin: 0 auto;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.title {
    // padding-top: 5rem;
    display: flex;
    flex-direction: column;
}

.el-row--flex.is-justify-center {
    justify-content: center; 
}</style>